<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

	<head>
		<title>客户开发计划</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<link href="../css/style.css" rel="stylesheet" type="text/css">
		<link href="../css/layui.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="../../js/vue.min.js"></script>
		<script src="../../js/layui/layui.js"></script>
		<script src="../script/common.js"></script>
	</head>

	<body>
		<div class="page_title">客户开发计划</div>
		<div class="button_bar">
			<!--<button class="layui-btn layui-btn-normal" onclick="help('');">帮助</button>-->
			<button class="layui-btn layui-btn-normal" onclick="reload();">查询</button>
		</div>
		<div id="app">
			<table class="query_form_table">
				<tr>
					<th>客户名称</th>
					<td><input type="text" placeholder="请输入客户名称" class="layui-input"></td>
					<th>概要</th>
					<td><input type="text" placeholder="请输入概要" class="layui-input"></td>
					<th>联系人</th>
					<td>
						<input type="text" placeholder="请输入联系人姓名" class="layui-input">
					</td>
				</tr>
			</table>
			<br />
			<table class="layui-table">
				<tr>
					<th>编号</th>
					<th>客户名称</th>
					<th>概要</th>
					<th>联系人</th>
					<th>联系人电话</th>
					<th>创建时间</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
				<tr>
					<td class="list_data_number">1</td>
					<td class="list_data_text">睿智数码</td>
					<td class="list_data_ltext">采购笔记本电脑意向</td>
					<td class="list_data_text">刘先生</td>
					<td class="list_data_text">13729239239</td>
					<td class="list_data_text">2007年12月06日</td>
					<td class="list_data_text">开发中</td>
					<td class="list_data_op">
						<button class="layui-btn layui-btn-normal layui-btn-small" onclick="to('~sale/dev_plan.html');"><img title="制定计划" src="../images/计划制定.png"/>制定计划</button>
						<button class="layui-btn layui-btn-normal layui-btn-small layui-btn-small" onclick="to('~sale/dev_execute.html')"><img title="执行计划" src="../images/执行.png"/>执行计划</button>
						<!--<button class="layui-btn layui-btn-normal layui-btn-small" onclick="alert('用户开发成功，已添加新客户记录。');"><img title="开发成功" src="../images/成功.png"/>开发成功</button>-->
						<!--<img onclick="to('dev_plan.html');" title="制定计划" src="../images/bt_plan.gif" class="op_button" />
						<img onclick="to('dev_execute.html');" title="执行计划" src="../images/bt_feedback.gif" class="op_button" />
						<img onclick="alert('用户开发成功，已添加新客户记录。');" title="开发成功" src="../images/bt_yes.gif" class="op_button" />-->
					</td>
				</tr>
				<tr>
					<td class="list_data_number">2</td>
					<td class="list_data_text">泰宝实业</td>
					<td class="list_data_ltext">采购笔记本电脑意向</td>
					<td class="list_data_text">马先生</td>
					<td class="list_data_text">13333239239</td>
					<td class="list_data_text">2007年11月16日</td>
					<td class="list_data_text">已归档</td>
					<td class="list_data_op">
						<button class="layui-btn layui-btn-normal layui-btn-small" onclick="to('~sale/dev_detail.html')"><img title="查看" src="../images/查看.png"/>查看详情</button>
						<!--<img onclick="to('dev_detail.html');" title="查看" src="../images/bt_detail.gif" class="op_button" />-->
					</td>
				</tr>
			</table>
			<div class="change_page" style="float: right; margin-right: 20px;">
				<table lay-skin="nob">
					<tr>
						<td><button class="layui-btn layui-btn-primary" v-on:click="querypage('1')">首页</button></td>
						<td><button class="layui-btn layui-btn-primary" v-on:click="querypage('-')">上一页</button>&nbsp;&nbsp;</td>
						<td>
							<input type="text" required lay-verify="required" class="layui-input" style="width: 30px;" v-model="pages">
						</td>
						<td>
							<label>/{{sumpages}}</label>
							<button class="layui-btn layui-btn-primary" v-on:click="querypage('0')">跳转</button>
						</td>
						<td><button class="layui-btn layui-btn-primary" v-on:click="querypage('+')">下一页</button></td>
						<td><button class="layui-btn layui-btn-primary" v-on:click="querypage('2')">末页</button></td>
					</tr>
				</table>
			</div>
		</div>
	</body>

</html>
<script>
	function changes(str) {
		parent.document.getElementById("mywork").src = str;
	}
	new Vue({
		el: "#app",
		data: {
			pages: 1,
			sumpages: 25
		},
		methods: {
			querypage: function(str) {
				var pages = this.pages;
				switch(str) {
					case '+':
						if(eval(pages + "+" + 1) <= this.sumpages) {
							this.pages = eval(pages + "+" + 1);
						}
						break;
					case '-':
						if(eval(pages + "-" + 1) >= 1) {
							this.pages = eval(pages + "-" + 1);
						}
						break;
					case '0':
						break;
					case '1':
						this.pages = 1;
						break;
					case '2':
						this.pages = this.sumpages;
						break;
					default:
						break;
				}
			}
		}
	})
</script>